<!DOCTYPE HTML>
<html lang="en" >
    
    <head>
        
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <title>第一步 | 美多商城</title>
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <meta name="description" content="">
        <meta name="generator" content="GitBook 2.6.7">
        
        
        <meta name="HandheldFriendly" content="true"/>
        <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
        <meta name="apple-mobile-web-app-capable" content="yes">
        <meta name="apple-mobile-web-app-status-bar-style" content="black">
        <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../../gitbook/images/apple-touch-icon-precomposed-152.png">
        <link rel="shortcut icon" href="../../gitbook/images/favicon.ico" type="image/x-icon">
        
    <link rel="stylesheet" href="../../gitbook/style.css">
    
        
        <link rel="stylesheet" href="../../gitbook/plugins/gitbook-plugin-highlight/website.css">
        
    
        
        <link rel="stylesheet" href="../../gitbook/plugins/gitbook-plugin-search/search.css">
        
    
        
        <link rel="stylesheet" href="../../gitbook/plugins/gitbook-plugin-fontsettings/website.css">
        
    
    

        
    
    
    <link rel="next" href="../../C02-Users/FindPassword/Step2.html" />
    
    
    <link rel="prev" href="../../C02-Users/FindPassword/index.html" />
    

        
    </head>
    <body>
        
        
    <div class="book"
        data-level="2.7.1"
        data-chapter-title="第一步"
        data-filepath="C02-Users/FindPassword/Step1.md"
        data-basepath="../.."
        data-revision="Thu May 24 2018 15:58:46 GMT+0800 (CST)"
        data-innerlanguage="">
    

<div class="book-summary">
    <nav role="navigation">
        <ul class="summary">
            
            
            
            

            

            
    
        <li class="chapter " data-level="0" data-path="index.html">
            
                
                    <a href="../../index.html">
                
                        <i class="fa fa-check"></i>
                        
                        美多商城
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1" data-path="C01-Prepare/index.html">
            
                
                    <a href="../../C01-Prepare/index.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.</b>
                        
                        项目准备
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.1" data-path="C01-Prepare/BusinessModel.html">
            
                
                    <a href="../../C01-Prepare/BusinessModel.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.1.</b>
                        
                        商业模式
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="C01-Prepare/DevelopmentProcess.html">
            
                
                    <a href="../../C01-Prepare/DevelopmentProcess.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.2.</b>
                        
                        开发流程
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="C01-Prepare/ProductAnalysis.html">
            
                
                    <a href="../../C01-Prepare/ProductAnalysis.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.3.</b>
                        
                        需求分析
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.4" data-path="C01-Prepare/ProjectStructure.html">
            
                
                    <a href="../../C01-Prepare/ProjectStructure.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.4.</b>
                        
                        项目架构
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.5" data-path="C01-Prepare/StartProject.html">
            
                
                    <a href="../../C01-Prepare/StartProject.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.5.</b>
                        
                        创建工程
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.6" data-path="C01-Prepare/Config.html">
            
                
                    <a href="../../C01-Prepare/Config.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.6.</b>
                        
                        配置
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2" data-path="C02-Users/index.html">
            
                
                    <a href="../../C02-Users/index.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.</b>
                        
                        用户部分
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.1" data-path="C02-Users/UserModel.html">
            
                
                    <a href="../../C02-Users/UserModel.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.1.</b>
                        
                        用户模型类
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.2" data-path="C02-Users/Register.html">
            
                
                    <a href="../../C02-Users/Register.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.2.</b>
                        
                        注册
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.3" data-path="C02-Users/CORS.html">
            
                
                    <a href="../../C02-Users/CORS.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.3.</b>
                        
                        跨域CORS
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.4" data-path="C02-Users/JWT.html">
            
                
                    <a href="../../C02-Users/JWT.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.4.</b>
                        
                        JWT
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.5" data-path="C02-Users/DRF-JWT.html">
            
                
                    <a href="../../C02-Users/DRF-JWT.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.5.</b>
                        
                        Django REST framework JWT
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.6" data-path="C02-Users/Login.html">
            
                
                    <a href="../../C02-Users/Login.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.6.</b>
                        
                        登录
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.7" data-path="C02-Users/FindPassword/index.html">
            
                
                    <a href="../../C02-Users/FindPassword/index.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.7.</b>
                        
                        找回密码
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter active" data-level="2.7.1" data-path="C02-Users/FindPassword/Step1.html">
            
                
                    <a href="../../C02-Users/FindPassword/Step1.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.7.1.</b>
                        
                        第一步
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.7.2" data-path="C02-Users/FindPassword/Step2.html">
            
                
                    <a href="../../C02-Users/FindPassword/Step2.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.7.2.</b>
                        
                        第二步
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.7.3" data-path="C02-Users/FindPassword/Step3.html">
            
                
                    <a href="../../C02-Users/FindPassword/Step3.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.7.3.</b>
                        
                        第三步
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.7.4" data-path="C02-Users/FindPassword/Step4.html">
            
                
                    <a href="../../C02-Users/FindPassword/Step4.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.7.4.</b>
                        
                        第四步
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2.8" data-path="C02-Users/QQLogin/index.html">
            
                
                    <a href="../../C02-Users/QQLogin/index.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.8.</b>
                        
                        QQ登录
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.8.1" data-path="C02-Users/QQLogin/Step1.html">
            
                
                    <a href="../../C02-Users/QQLogin/Step1.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.8.1.</b>
                        
                        第一步
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.8.2" data-path="C02-Users/QQLogin/Step2.html">
            
                
                    <a href="../../C02-Users/QQLogin/Step2.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.8.2.</b>
                        
                        第二步
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.8.3" data-path="C02-Users/QQLogin/Step3.html">
            
                
                    <a href="../../C02-Users/QQLogin/Step3.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.8.3.</b>
                        
                        第三步
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2.9" data-path="C02-Users/UserInfo.html">
            
                
                    <a href="../../C02-Users/UserInfo.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.9.</b>
                        
                        用户中心个人信息
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.10" data-path="C02-Users/Email/index.html">
            
                
                    <a href="../../C02-Users/Email/index.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.10.</b>
                        
                        邮件与验证
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.10.1" data-path="C02-Users/Email/DjangoEmail.html">
            
                
                    <a href="../../C02-Users/Email/DjangoEmail.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.10.1.</b>
                        
                        Django发送邮件的方法
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.10.2" data-path="C02-Users/Email/SendEmail.html">
            
                
                    <a href="../../C02-Users/Email/SendEmail.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.10.2.</b>
                        
                        保存邮箱并发送验证邮件
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.10.3" data-path="C02-Users/Email/VerifyEmail.html">
            
                
                    <a href="../../C02-Users/Email/VerifyEmail.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.10.3.</b>
                        
                        验证邮箱链接
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2.11" data-path="C02-Users/Address/index.html">
            
                
                    <a href="../../C02-Users/Address/index.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.11.</b>
                        
                        收货地址
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.11.1" data-path="C02-Users/Address/AreaSelect.html">
            
                
                    <a href="../../C02-Users/Address/AreaSelect.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.11.1.</b>
                        
                        省市区地址查询
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.11.2" data-path="C02-Users/Address/Cache.html">
            
                
                    <a href="../../C02-Users/Address/Cache.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.11.2.</b>
                        
                        使用缓存
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.11.3" data-path="C02-Users/Address/UserAddressManagement.html">
            
                
                    <a href="../../C02-Users/Address/UserAddressManagement.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.11.3.</b>
                        
                        用户地址管理
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="3" data-path="C03-Goods/index.html">
            
                
                    <a href="../../C03-Goods/index.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.</b>
                        
                        商品部分
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="3.1" data-path="C03-Goods/DatabaseDesign.html">
            
                
                    <a href="../../C03-Goods/DatabaseDesign.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.1.</b>
                        
                        数据表设计
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.2" data-path="C03-Goods/FastDFS.html">
            
                
                    <a href="../../C03-Goods/FastDFS.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.2.</b>
                        
                        FastDFS分布式文件系统
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.3" data-path="C03-Goods/Docker/index.html">
            
                
                    <a href="../../C03-Goods/Docker/index.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.3.</b>
                        
                        Docker使用
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="3.3.1" data-path="C03-Goods/Docker/Introduce.html">
            
                
                    <a href="../../C03-Goods/Docker/Introduce.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.3.1.</b>
                        
                        Docker简介
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.3.2" data-path="C03-Goods/Docker/InstallAndOperations.html">
            
                
                    <a href="../../C03-Goods/Docker/InstallAndOperations.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.3.2.</b>
                        
                        安装与操作
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="3.4" data-path="C03-Goods/FastDFSDocker.html">
            
                
                    <a href="../../C03-Goods/FastDFSDocker.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.4.</b>
                        
                        使用Docker安装FastDFS
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.5" data-path="C03-Goods/FastDFSClientAndDjangoFileSystem.html">
            
                
                    <a href="../../C03-Goods/FastDFSClientAndDjangoFileSystem.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.5.</b>
                        
                        FastDFS客户端与自定义文件存储系统
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.6" data-path="C03-Goods/CKEditor.html">
            
                
                    <a href="../../C03-Goods/CKEditor.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.6.</b>
                        
                        CKEditor富文本编辑器
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.7" data-path="C03-Goods/ImportGoodsData.html">
            
                
                    <a href="../../C03-Goods/ImportGoodsData.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.7.</b>
                        
                        添加测试数据
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.8" data-path="C03-Goods/FreezeHTML.html">
            
                
                    <a href="../../C03-Goods/FreezeHTML.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.8.</b>
                        
                        页面静态化
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.9" data-path="C03-Goods/DjangoCrontab.html">
            
                
                    <a href="../../C03-Goods/DjangoCrontab.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.9.</b>
                        
                        定时任务
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.10" data-path="C03-Goods/GenerateIndexHTMLScript.html">
            
                
                    <a href="../../C03-Goods/GenerateIndexHTMLScript.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.10.</b>
                        
                        静态化首页的手动脚本
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.11" data-path="C03-Goods/GoodsDetail.html">
            
                
                    <a href="../../C03-Goods/GoodsDetail.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.11.</b>
                        
                        商品详情页面
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.12" data-path="C03-Goods/HotSaleGoods.html">
            
                
                    <a href="../../C03-Goods/HotSaleGoods.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.12.</b>
                        
                        热销商品
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.13" data-path="C03-Goods/UserBrowseHistory.html">
            
                
                    <a href="../../C03-Goods/UserBrowseHistory.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.13.</b>
                        
                        用户浏览历史记录
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.14" data-path="C03-Goods/GoodsList.html">
            
                
                    <a href="../../C03-Goods/GoodsList.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.14.</b>
                        
                        商品列表页
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.15" data-path="C03-Goods/GoodsSearch.html">
            
                
                    <a href="../../C03-Goods/GoodsSearch.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.15.</b>
                        
                        商品搜索
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="4" data-path="C04-Cart/index.html">
            
                
                    <a href="../../C04-Cart/index.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.</b>
                        
                        购物车部分
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="4.1" data-path="C04-Cart/DataStructureDesign.html">
            
                
                    <a href="../../C04-Cart/DataStructureDesign.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.1.</b>
                        
                        购物车数据存储设计
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.2" data-path="C04-Cart/Implement.html">
            
                
                    <a href="../../C04-Cart/Implement.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.2.</b>
                        
                        购物车实现
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.3" data-path="C04-Cart/MergeCart.html">
            
                
                    <a href="../../C04-Cart/MergeCart.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.3.</b>
                        
                        登录合并购物车
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="5" data-path="C05-Order/index.html">
            
                
                    <a href="../../C05-Order/index.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.</b>
                        
                        订单部分
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="5.1" data-path="C05-Order/OrderDBModel.html">
            
                
                    <a href="../../C05-Order/OrderDBModel.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.1.</b>
                        
                        订单数据库设计
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="5.2" data-path="C05-Order/PlaceOrder.html">
            
                
                    <a href="../../C05-Order/PlaceOrder.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.2.</b>
                        
                        订单结算
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="5.3" data-path="C05-Order/SaveOrder.html">
            
                
                    <a href="../../C05-Order/SaveOrder.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.3.</b>
                        
                        保存订单
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="5.4" data-path="C05-Order/OrderSuccess.html">
            
                
                    <a href="../../C05-Order/OrderSuccess.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.4.</b>
                        
                        下单成功
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="6" data-path="C06-Pay/index.html">
            
                
                    <a href="../../C06-Pay/index.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.</b>
                        
                        支付宝支付
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="6.1" data-path="C06-Pay/Alipay.html">
            
                
                    <a href="../../C06-Pay/Alipay.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.1.</b>
                        
                        接入支付宝
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="6.2" data-path="C06-Pay/Paying.html">
            
                
                    <a href="../../C06-Pay/Paying.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.2.</b>
                        
                        发起支付
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="6.3" data-path="C06-Pay/PaymentResult.html">
            
                
                    <a href="../../C06-Pay/PaymentResult.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.3.</b>
                        
                        保存支付结果
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="7" data-path="C07-Xadmin.html">
            
                
                    <a href="../../C07-Xadmin.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>7.</b>
                        
                        Xadmin
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="8" data-path="C08-Permission.html">
            
                
                    <a href="../../C08-Permission.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>8.</b>
                        
                        用户权限控制
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="9" data-path="C09-Database/index.html">
            
                
                    <a href="../../C09-Database/index.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>9.</b>
                        
                        数据库读写分离
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="9.1" data-path="C09-Database/MasterSlave.html">
            
                
                    <a href="../../C09-Database/MasterSlave.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>9.1.</b>
                        
                        主从同步配置
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="9.2" data-path="C09-Database/ReadWriteSeparate.html">
            
                
                    <a href="../../C09-Database/ReadWriteSeparate.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>9.2.</b>
                        
                        Django数据库读写分离
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="10" data-path="C10-Deploy.html">
            
                
                    <a href="../../C10-Deploy.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>10.</b>
                        
                        Django部署
                    </a>
            
            
        </li>
    


            
            <li class="divider"></li>
            <li>
                <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
                    Published with GitBook
                </a>
            </li>
            
        </ul>
    </nav>
</div>

    <div class="book-body">
        <div class="body-inner">
            <div class="book-header" role="navigation">
    <!-- Actions Left -->
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="../../" >美多商城</a>
    </h1>
</div>

            <div class="page-wrapper" tabindex="-1" role="main">
                <div class="page-inner">
                
                
                    <section class="normal" id="section-">
                    
                        <h2 id="&#x7B2C;&#x4E00;&#x6B65;">&#x7B2C;&#x4E00;&#x6B65;</h2>
<p><img src="../../images/%E6%89%BE%E5%9B%9E%E5%AF%86%E7%A0%81%E7%AC%AC%E4%B8%80%E6%AD%A5.png" alt="&#x627E;&#x56DE;&#x5BC6;&#x7801;&#x7B2C;&#x4E00;&#x6B65;"></p>
<p>&#x8D26;&#x53F7;&#x540D;&#x53EF;&#x4EE5;&#x662F;&#x7528;&#x6237;&#x540D;&#x4E5F;&#x53EF;&#x4EE5;&#x662F;&#x624B;&#x673A;&#x53F7;&#xFF0C;&#x6839;&#x636E;&#x7528;&#x6237;&#x586B;&#x5199;&#x7684;&#x8D26;&#x53F7;&#x548C;&#x56FE;&#x7247;&#x9A8C;&#x8BC1;&#x7801;&#xFF0C;&#x83B7;&#x53D6;&#x4E0B;&#x4E00;&#x6B65;&#x7528;&#x4E8E;&#x53D1;&#x9001;&#x77ED;&#x4FE1;&#x9A8C;&#x8BC1;&#x7801;&#x7684;&#x63A5;&#x53E3;&#x8C03;&#x7528;&#x51ED;&#x636E;access_token&#x3002;</p>
<p><strong>&#x6B64;&#x4E00;&#x6B65;&#x7684;&#x4F5C;&#x7528;&#x662F;&#x7528;&#x4E8E;&#x5224;&#x65AD;&#x7528;&#x6237;&#x7684;&#x8D26;&#x53F7;&#x662F;&#x5426;&#x5B58;&#x5728;&#x3002;</strong></p>
<h4 id="&#x540E;&#x7AEF;&#x63A5;&#x53E3;&#x8BBE;&#x8BA1;&#xFF1A;">&#x540E;&#x7AEF;&#x63A5;&#x53E3;&#x8BBE;&#x8BA1;&#xFF1A;</h4>
<p>&#x8BF7;&#x6C42;&#x65B9;&#x5F0F;&#xFF1A; GET  <code>accounts/(?P&lt;account&gt;\w{5,20})/sms/token/?image_code_id=xxx&amp;text=xxx</code></p>
<p>&#x8BF7;&#x6C42;&#x53C2;&#x6570;&#xFF1A;</p>
<table>
<thead>
<tr>
<th>&#x53C2;&#x6570;&#x540D;</th>
<th>&#x7C7B;&#x578B;</th>
<th>&#x662F;&#x5426;&#x5FC5;&#x987B;</th>
<th>&#x8BF4;&#x660E;</th>
</tr>
</thead>
<tbody>
<tr>
<td>account</td>
<td>str</td>
<td>&#x662F;</td>
<td>&#x7528;&#x6237;&#x540D;&#x6216;&#x624B;&#x673A;&#x53F7;</td>
</tr>
<tr>
<td>image_code_id</td>
<td>uuid</td>
<td>&#x662F;</td>
<td>&#x56FE;&#x7247;&#x9A8C;&#x8BC1;&#x7801;id</td>
</tr>
<tr>
<td>text</td>
<td>str</td>
<td>&#x662F;</td>
<td>&#x56FE;&#x7247;&#x9A8C;&#x8BC1;&#x7801;&#x7528;&#x6237;&#x586B;&#x5199;&#x503C;</td>
</tr>
</tbody>
</table>
<p>&#x8FD4;&#x56DE;&#x6570;&#x636E;&#xFF1A;</p>
<table>
<thead>
<tr>
<th>&#x8FD4;&#x56DE;&#x503C;</th>
<th>&#x7C7B;&#x578B;</th>
<th>&#x8BF4;&#x660E;</th>
</tr>
</thead>
<tbody>
<tr>
<td>mobile</td>
<td>str</td>
<td>&#x624B;&#x673A;&#x53F7;&#xFF08;&#x5982;<code>185****1234</code>)</td>
</tr>
<tr>
<td>access_token</td>
<td>str</td>
<td>&#x53D1;&#x9001;&#x77ED;&#x4FE1;&#x7684;&#x51ED;&#x636E;</td>
</tr>
</tbody>
</table>
<h4 id="&#x4F7F;&#x7528;itsdangerous&#x751F;&#x6210;&#x51ED;&#x636E;accesstoken">&#x4F7F;&#x7528;itsdangerous&#x751F;&#x6210;&#x51ED;&#x636E;access_token</h4>
<p>itsdangerous&#x6A21;&#x5757;&#x7684;&#x53C2;&#x8003;&#x8D44;&#x6599;&#x8FDE;&#x63A5;<a href="http://itsdangerous.readthedocs.io/en/latest" target="_blank">http://itsdangerous.readthedocs.io/en/latest</a>/</p>
<h5 id="&#x5B89;&#x88C5;">&#x5B89;&#x88C5;</h5>
<pre><code class="lang-shell">pip install itsdangerous
</code></pre>
<h5 id="timedjsonwebsignatureserializer&#x7684;&#x4F7F;&#x7528;"><code>TimedJSONWebSignatureSerializer</code>&#x7684;&#x4F7F;&#x7528;</h5>
<p>&#x4F7F;&#x7528;TimedJSONWebSignatureSerializer&#x53EF;&#x4EE5;&#x751F;&#x6210;&#x5E26;&#x6709;&#x6709;&#x6548;&#x671F;&#x7684;token</p>
<pre><code class="lang-python"><span class="hljs-keyword">from</span> itsdangerous <span class="hljs-keyword">import</span> TimedJSONWebSignatureSerializer <span class="hljs-keyword">as</span> Serializer
<span class="hljs-keyword">from</span> django.conf <span class="hljs-keyword">import</span> settings

<span class="hljs-comment"># serializer = Serializer(&#x79D8;&#x94A5;, &#x6709;&#x6548;&#x671F;&#x79D2;)</span>
serializer = Serializer(settings.SECRET_KEY, <span class="hljs-number">300</span>)
<span class="hljs-comment"># serializer.dumps(&#x6570;&#x636E;), &#x8FD4;&#x56DE;bytes&#x7C7B;&#x578B;</span>
token = serializer.dumps({<span class="hljs-string">&apos;mobile&apos;</span>: <span class="hljs-string">&apos;18512345678&apos;</span>})
token = token.decode()

<span class="hljs-comment"># &#x68C0;&#x9A8C;token</span>
<span class="hljs-comment"># &#x9A8C;&#x8BC1;&#x5931;&#x8D25;&#xFF0C;&#x4F1A;&#x629B;&#x51FA;itsdangerous.BadData&#x5F02;&#x5E38;</span>
serializer = Serializer(settings.SECRET_KEY, <span class="hljs-number">300</span>)
<span class="hljs-keyword">try</span>:
    data = serializer.loads(token)
<span class="hljs-keyword">except</span> BadData:
    <span class="hljs-keyword">return</span> <span class="hljs-keyword">None</span>
</code></pre>
<p>&#x4FEE;&#x6539;vefifications/serializers.py&#x4E2D;&#x7684;CheckImageCodeSerialzier</p>
<pre><code class="lang-python">lass CheckImageCodeSerialzier(serializers.Serializer):
    <span class="hljs-string">&quot;&quot;&quot;
    &#x56FE;&#x7247;&#x9A8C;&#x8BC1;&#x7801;&#x6821;&#x9A8C;&#x5E8F;&#x5217;&#x5316;&#x5668;
    &quot;&quot;&quot;</span>
    ...

    <span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">validate</span><span class="hljs-params">(self, attrs)</span>:</span>
        <span class="hljs-string">&quot;&quot;&quot;&#x6821;&#x9A8C;&#x56FE;&#x7247;&#x9A8C;&#x8BC1;&#x7801;&#x662F;&#x5426;&#x6B63;&#x786E;&quot;&quot;&quot;</span>
        ...
        <span class="hljs-comment"># &#x5728;&#x6B64;&#x5904;&#x4FEE;&#x6539;</span>
        <span class="hljs-comment"># 60s&#x5185;&#x662F;&#x5426;&#x6709;&#x53D1;&#x9001;&#x8BB0;&#x5F55;</span>
        mobile = self.context[<span class="hljs-string">&apos;view&apos;</span>].kwargs.get(<span class="hljs-string">&apos;mobile&apos;</span>)
        <span class="hljs-keyword">if</span> mobile:
            send_flag = redis_conn.get(<span class="hljs-string">&apos;send_flag_%s&apos;</span> % mobile)
            <span class="hljs-keyword">if</span> send_flag:
                <span class="hljs-keyword">raise</span> serializers.ValidationError(<span class="hljs-string">&apos;&#x53D1;&#x9001;&#x77ED;&#x4FE1;&#x6B21;&#x6570;&#x8FC7;&#x4E8E;&#x9891;&#x7E41;&apos;</span>)

        <span class="hljs-keyword">return</span> attrs
</code></pre>
<p>&#x89C6;&#x56FE;</p>
<pre><code class="lang-python"><span class="hljs-comment"># users/views.py</span>
<span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">SMSCodeTokenView</span><span class="hljs-params">(GenericAPIView)</span>:</span>
    <span class="hljs-string">&quot;&quot;&quot;
    &#x6839;&#x636E;&#x8D26;&#x53F7;&#x548C;&#x56FE;&#x7247;&#x9A8C;&#x8BC1;&#x7801;&#xFF0C;&#x83B7;&#x53D6;&#x53D1;&#x9001;&#x77ED;&#x4FE1;&#x7684;token
    &quot;&quot;&quot;</span>
    serializer_class = CheckImageCodeSerialzier

    <span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">get</span><span class="hljs-params">(self, request, account)</span>:</span>
        serializer = self.get_serializer(data=request.query_params)
        serializer.is_valid(raise_exception=<span class="hljs-keyword">True</span>)

        user = get_user_by_account(account)
        <span class="hljs-keyword">if</span> user <span class="hljs-keyword">is</span> <span class="hljs-keyword">None</span>:
            <span class="hljs-keyword">return</span> Response({<span class="hljs-string">&apos;message&apos;</span>: <span class="hljs-string">&apos;&#x7528;&#x6237;&#x4E0D;&#x5B58;&#x5728;&apos;</span>}, status=status.HTTP_404_NOT_FOUND)

        <span class="hljs-comment"># &#x751F;&#x6210;&#x53D1;&#x9001;&#x77ED;&#x4FE1;&#x7684;access_token</span>
        access_token = user.generate_send_sms_token()

        <span class="hljs-comment"># &#x5904;&#x7406;&#x624B;&#x673A;&#x53F7;</span>
        mobile = re.sub(<span class="hljs-string">r&apos;(\d{3})\d{4}(\d{3})&apos;</span>, <span class="hljs-string">r&apos;\1****\2&apos;</span>, user.mobile)
        <span class="hljs-keyword">return</span> Response({<span class="hljs-string">&apos;mobile&apos;</span>: mobile, <span class="hljs-string">&apos;access_token&apos;</span>: access_token})
</code></pre>
<p>&#x5728;User&#x6A21;&#x578B;&#x7C7B;&#x4E2D;&#x5B9E;&#x73B0;generate_send_sms_code_token()&#x65B9;&#x6CD5;</p>
<pre><code class="lang-python"><span class="hljs-keyword">from</span> itsdangerous <span class="hljs-keyword">import</span> TimedJSONWebSignatureSerializer <span class="hljs-keyword">as</span> TJWSSerializer

<span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">User</span><span class="hljs-params">(AbstractUser)</span>:</span>
    <span class="hljs-string">&quot;&quot;&quot;
    &#x7528;&#x6237;&#x4FE1;&#x606F;
    &quot;&quot;&quot;</span>
    ...

    <span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">generate_send_sms_code_token</span><span class="hljs-params">(self)</span>:</span>
        <span class="hljs-string">&quot;&quot;&quot;
        &#x751F;&#x6210;&#x53D1;&#x9001;&#x77ED;&#x4FE1;&#x9A8C;&#x8BC1;&#x7801;&#x7684;token
        &quot;&quot;&quot;</span>
        serializer = TJWSSerializer(settings.SECRET_KEY, expires_in=constants.SEND_SMS_TOKEN_EXPIRES)
        data = {<span class="hljs-string">&apos;mobile&apos;</span>: self.mobile}
        token = serializer.dumps(data)
        <span class="hljs-keyword">return</span> token.decode()
</code></pre>
<h3 id="&#x524D;&#x7AEF;">&#x524D;&#x7AEF;</h3>
<p>&#x4FEE;&#x6539;find_password.html&#xFF0C;&#x6DFB;&#x52A0;vue&#x53D8;&#x91CF;&#x4E0E;&#x63A7;&#x5236;</p>
<pre><code class="lang-html"><span class="hljs-doctype">&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">html</span> <span class="hljs-attribute">xmlns</span>=<span class="hljs-value">&quot;http://www.w3.org/1999/xhtml&quot;</span> <span class="hljs-attribute">xml:lang</span>=<span class="hljs-value">&quot;en&quot;</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">head</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-title">meta</span> <span class="hljs-attribute">http-equiv</span>=<span class="hljs-value">&quot;Content-Type&quot;</span> <span class="hljs-attribute">content</span>=<span class="hljs-value">&quot;text/html;charset=UTF-8&quot;</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-title">title</span>&gt;</span>&#x7F8E;&#x591A;&#x5546;&#x57CE;-&#x627E;&#x56DE;&#x5BC6;&#x7801;<span class="hljs-tag">&lt;/<span class="hljs-title">title</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-title">link</span> <span class="hljs-attribute">rel</span>=<span class="hljs-value">&quot;stylesheet&quot;</span> <span class="hljs-attribute">type</span>=<span class="hljs-value">&quot;text/css&quot;</span> <span class="hljs-attribute">href</span>=<span class="hljs-value">&quot;css/reset.css&quot;</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-title">link</span> <span class="hljs-attribute">rel</span>=<span class="hljs-value">&quot;stylesheet&quot;</span> <span class="hljs-attribute">type</span>=<span class="hljs-value">&quot;text/css&quot;</span> <span class="hljs-attribute">href</span>=<span class="hljs-value">&quot;css/main.css&quot;</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-title">script</span> <span class="hljs-attribute">type</span>=<span class="hljs-value">&quot;text/javascript&quot;</span> <span class="hljs-attribute">src</span>=<span class="hljs-value">&quot;js/host.js&quot;</span>&gt;</span><span class="undefined"></span><span class="hljs-tag">&lt;/<span class="hljs-title">script</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-title">script</span> <span class="hljs-attribute">type</span>=<span class="hljs-value">&quot;text/javascript&quot;</span> <span class="hljs-attribute">src</span>=<span class="hljs-value">&quot;js/vue-2.5.16.js&quot;</span>&gt;</span><span class="undefined"></span><span class="hljs-tag">&lt;/<span class="hljs-title">script</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-title">script</span> <span class="hljs-attribute">type</span>=<span class="hljs-value">&quot;text/javascript&quot;</span> <span class="hljs-attribute">src</span>=<span class="hljs-value">&quot;js/axios-0.18.0.min.js&quot;</span>&gt;</span><span class="undefined"></span><span class="hljs-tag">&lt;/<span class="hljs-title">script</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-title">head</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">body</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-title">div</span> <span class="hljs-attribute">class</span>=<span class="hljs-value">&quot;find_header&quot;</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-title">img</span> <span class="hljs-attribute">src</span>=<span class="hljs-value">&quot;images/logo.png&quot;</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-title">span</span> <span class="hljs-attribute">class</span>=<span class="hljs-value">&quot;sub_page_name fl&quot;</span>&gt;</span>|&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&#x627E;&#x56DE;&#x5BC6;&#x7801;<span class="hljs-tag">&lt;/<span class="hljs-title">span</span>&gt;</span>
    <span class="hljs-tag">&lt;/<span class="hljs-title">div</span>&gt;</span>

    <span class="hljs-tag">&lt;<span class="hljs-title">div</span> <span class="hljs-attribute">class</span>=<span class="hljs-value">&quot;find_form&quot;</span> <span class="hljs-attribute">id</span>=<span class="hljs-value">&quot;app&quot;</span> <span class="hljs-attribute">v-cloak</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-title">div</span> <span class="hljs-attribute">class</span>=<span class="hljs-value">&quot;step&quot;</span> <span class="hljs-attribute">v-bind:class</span>=<span class="hljs-value">&quot;step_class&quot;</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-title">div</span>&gt;</span>
        <span class="hljs-comment">&lt;!-- &#x7B2C;&#x4E00;&#x6B65;&#x7684;&#x8868;&#x5355; --&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-title">form</span> <span class="hljs-attribute">class</span>=<span class="hljs-value">&quot;form_step&quot;</span> <span class="hljs-attribute">v-show</span>=<span class="hljs-value">&quot;is_show_form_1&quot;</span> <span class="hljs-attribute">v-on:submit.prevent</span>=<span class="hljs-value">&quot;form_1_on_submit&quot;</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-title">div</span> <span class="hljs-attribute">class</span>=<span class="hljs-value">&quot;form_group&quot;</span>&gt;</span>
                <span class="hljs-tag">&lt;<span class="hljs-title">label</span>&gt;</span>&#x8D26;&#x53F7;&#x540D;&#xFF1A;<span class="hljs-tag">&lt;/<span class="hljs-title">label</span>&gt;</span>
                <span class="hljs-tag">&lt;<span class="hljs-title">input</span> <span class="hljs-attribute">v-model</span>=<span class="hljs-value">&quot;username&quot;</span> <span class="hljs-attribute">v-on:blur</span>=<span class="hljs-value">&quot;check_username&quot;</span> <span class="hljs-attribute">type</span>=<span class="hljs-value">&quot;text&quot;</span> <span class="hljs-attribute">name</span>=<span class="hljs-value">&quot;username&quot;</span> <span class="hljs-attribute">class</span>=<span class="hljs-value">&quot;input_txt&quot;</span>&gt;</span>
                <span class="hljs-tag">&lt;<span class="hljs-title">span</span> <span class="hljs-attribute">v-show</span>=<span class="hljs-value">&quot;error_username&quot;</span> <span class="hljs-attribute">class</span>=<span class="hljs-value">&quot;error&quot;</span>&gt;</span>{{ error_username_message }}<span class="hljs-tag">&lt;/<span class="hljs-title">span</span>&gt;</span>
            <span class="hljs-tag">&lt;/<span class="hljs-title">div</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-title">div</span> <span class="hljs-attribute">class</span>=<span class="hljs-value">&quot;form_group&quot;</span>&gt;</span>
                <span class="hljs-tag">&lt;<span class="hljs-title">label</span>&gt;</span>&#x9A8C;&#x8BC1;&#x7801;&#xFF1A;<span class="hljs-tag">&lt;/<span class="hljs-title">label</span>&gt;</span>
                <span class="hljs-tag">&lt;<span class="hljs-title">input</span> <span class="hljs-attribute">v-model</span>=<span class="hljs-value">&quot;image_code&quot;</span> <span class="hljs-attribute">v-on:blur</span>=<span class="hljs-value">&quot;check_image_code&quot;</span> <span class="hljs-attribute">type</span>=<span class="hljs-value">&quot;text&quot;</span> <span class="hljs-attribute">name</span>=<span class="hljs-value">&quot;img_code&quot;</span> <span class="hljs-attribute">class</span>=<span class="hljs-value">&quot;input_txt input_txt2&quot;</span>&gt;</span>
                <span class="hljs-tag">&lt;<span class="hljs-title">img</span> <span class="hljs-attribute">v-bind:src</span>=<span class="hljs-value">&quot;image_code_url&quot;</span> <span class="hljs-attribute">v-on:click</span>=<span class="hljs-value">&quot;generate_image_code&quot;</span> <span class="hljs-attribute">alt</span>=<span class="hljs-value">&quot;&#x56FE;&#x5F62;&#x9A8C;&#x8BC1;&#x7801;&quot;</span> <span class="hljs-attribute">class</span>=<span class="hljs-value">&quot;pic_code&quot;</span>&gt;</span>
                <span class="hljs-tag">&lt;<span class="hljs-title">span</span> <span class="hljs-attribute">v-show</span>=<span class="hljs-value">&quot;error_image_code&quot;</span> <span class="hljs-attribute">class</span>=<span class="hljs-value">&quot;error&quot;</span>&gt;</span>{{ error_image_code_message }}<span class="hljs-tag">&lt;/<span class="hljs-title">span</span>&gt;</span>
            <span class="hljs-tag">&lt;/<span class="hljs-title">div</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-title">div</span> <span class="hljs-attribute">class</span>=<span class="hljs-value">&quot;form_group&quot;</span>&gt;</span>
                <span class="hljs-tag">&lt;<span class="hljs-title">input</span> <span class="hljs-attribute">type</span>=<span class="hljs-value">&quot;submit&quot;</span> <span class="hljs-attribute">value</span>=<span class="hljs-value">&quot;&#x4E0B;&#x4E00;&#x6B65;&quot;</span> <span class="hljs-attribute">class</span>=<span class="hljs-value">&quot;input_sub&quot;</span>&gt;</span>
            <span class="hljs-tag">&lt;/<span class="hljs-title">div</span>&gt;</span>
        <span class="hljs-tag">&lt;/<span class="hljs-title">form</span>&gt;</span>

        <span class="hljs-comment">&lt;!-- &#x7B2C;&#x4E8C;&#x6B65;&#x7684;&#x8868;&#x5355; --&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-title">form</span> <span class="hljs-attribute">class</span>=<span class="hljs-value">&quot;form_step&quot;</span> <span class="hljs-attribute">v-show</span>=<span class="hljs-value">&quot;is_show_form_2&quot;</span> <span class="hljs-attribute">v-on:submit.prevent</span>=<span class="hljs-value">&quot;form_2_on_submit&quot;</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-title">div</span> <span class="hljs-attribute">class</span>=<span class="hljs-value">&quot;form_group&quot;</span>&gt;</span>
                <span class="hljs-tag">&lt;<span class="hljs-title">label</span>&gt;</span>&#x624B;&#x673A;&#x53F7;&#xFF1A;<span class="hljs-tag">&lt;/<span class="hljs-title">label</span>&gt;</span>
                <span class="hljs-tag">&lt;<span class="hljs-title">input</span> <span class="hljs-attribute">v-model</span>=<span class="hljs-value">&quot;mobile&quot;</span> <span class="hljs-attribute">type</span>=<span class="hljs-value">&quot;text&quot;</span> <span class="hljs-attribute">name</span>=<span class="hljs-value">&quot;mobile&quot;</span> <span class="hljs-attribute">class</span>=<span class="hljs-value">&quot;input_txt&quot;</span> <span class="hljs-attribute">disabled</span>&gt;</span>
            <span class="hljs-tag">&lt;/<span class="hljs-title">div</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-title">div</span> <span class="hljs-attribute">class</span>=<span class="hljs-value">&quot;form_group&quot;</span>&gt;</span>
                <span class="hljs-tag">&lt;<span class="hljs-title">label</span>&gt;</span>&#x77ED;&#x4FE1;&#x9A8C;&#x8BC1;&#x7801;&#xFF1A;<span class="hljs-tag">&lt;/<span class="hljs-title">label</span>&gt;</span>
                <span class="hljs-tag">&lt;<span class="hljs-title">input</span> <span class="hljs-attribute">v-model</span>=<span class="hljs-value">&quot;sms_code&quot;</span> <span class="hljs-attribute">v-on:blur</span>=<span class="hljs-value">&quot;check_sms_code&quot;</span> <span class="hljs-attribute">type</span>=<span class="hljs-value">&quot;text&quot;</span> <span class="hljs-attribute">name</span>=<span class="hljs-value">&quot;code&quot;</span> <span class="hljs-attribute">class</span>=<span class="hljs-value">&quot;input_txt input_txt2&quot;</span>&gt;</span>
                   <span class="hljs-tag">&lt;<span class="hljs-title">a</span> <span class="hljs-attribute">v-on:click</span>=<span class="hljs-value">&quot;send_sms_code&quot;</span> <span class="hljs-attribute">class</span>=<span class="hljs-value">&quot;phone_code&quot;</span>&gt;</span>{{ sms_code_tip }}<span class="hljs-tag">&lt;/<span class="hljs-title">a</span>&gt;</span>
                <span class="hljs-tag">&lt;<span class="hljs-title">span</span> <span class="hljs-attribute">v-show</span>=<span class="hljs-value">&quot;error_sms_code&quot;</span> <span class="hljs-attribute">class</span>=<span class="hljs-value">&quot;error&quot;</span>&gt;</span>{{ error_sms_code_message }}<span class="hljs-tag">&lt;/<span class="hljs-title">span</span>&gt;</span>
            <span class="hljs-tag">&lt;/<span class="hljs-title">div</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-title">div</span> <span class="hljs-attribute">class</span>=<span class="hljs-value">&quot;form_group&quot;</span>&gt;</span>
                <span class="hljs-tag">&lt;<span class="hljs-title">input</span> <span class="hljs-attribute">type</span>=<span class="hljs-value">&quot;submit&quot;</span> <span class="hljs-attribute">value</span>=<span class="hljs-value">&quot;&#x4E0B;&#x4E00;&#x6B65;&quot;</span> <span class="hljs-attribute">class</span>=<span class="hljs-value">&quot;input_sub&quot;</span>&gt;</span>
            <span class="hljs-tag">&lt;/<span class="hljs-title">div</span>&gt;</span>
        <span class="hljs-tag">&lt;/<span class="hljs-title">form</span>&gt;</span>

        <span class="hljs-comment">&lt;!-- &#x7B2C;&#x4E09;&#x6B65;&#x7684;&#x8868;&#x5355; --&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-title">form</span> <span class="hljs-attribute">class</span>=<span class="hljs-value">&quot;form_step&quot;</span> <span class="hljs-attribute">v-show</span>=<span class="hljs-value">&quot;is_show_form_3&quot;</span> <span class="hljs-attribute">v-on:submit.prevent</span>=<span class="hljs-value">&quot;form_3_on_submit&quot;</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-title">div</span> <span class="hljs-attribute">class</span>=<span class="hljs-value">&quot;form_group&quot;</span>&gt;</span>
                <span class="hljs-tag">&lt;<span class="hljs-title">label</span>&gt;</span>&#x65B0;&#x5BC6;&#x7801;&#xFF1A;<span class="hljs-tag">&lt;/<span class="hljs-title">label</span>&gt;</span>
                <span class="hljs-tag">&lt;<span class="hljs-title">input</span> <span class="hljs-attribute">v-model</span>=<span class="hljs-value">&quot;password&quot;</span> <span class="hljs-attribute">v-on:blur</span>=<span class="hljs-value">&quot;check_pwd&quot;</span> <span class="hljs-attribute">type</span>=<span class="hljs-value">&quot;password&quot;</span> <span class="hljs-attribute">name</span>=<span class="hljs-value">&quot;pwd&quot;</span> <span class="hljs-attribute">class</span>=<span class="hljs-value">&quot;input_txt&quot;</span>&gt;</span>
                <span class="hljs-tag">&lt;<span class="hljs-title">span</span> <span class="hljs-attribute">v-show</span>=<span class="hljs-value">&quot;error_password&quot;</span> <span class="hljs-attribute">class</span>=<span class="hljs-value">&quot;error&quot;</span>&gt;</span>&#x5BC6;&#x7801;&#x6700;&#x5C11;8&#x4F4D;&#xFF0C;&#x6700;&#x957F;20&#x4F4D;<span class="hljs-tag">&lt;/<span class="hljs-title">span</span>&gt;</span>
            <span class="hljs-tag">&lt;/<span class="hljs-title">div</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-title">div</span> <span class="hljs-attribute">class</span>=<span class="hljs-value">&quot;form_group&quot;</span>&gt;</span>
                <span class="hljs-tag">&lt;<span class="hljs-title">label</span>&gt;</span>&#x518D;&#x6B21;&#x8F93;&#x5165;&#xFF1A;<span class="hljs-tag">&lt;/<span class="hljs-title">label</span>&gt;</span>
                <span class="hljs-tag">&lt;<span class="hljs-title">input</span> <span class="hljs-attribute">v-model</span>=<span class="hljs-value">&quot;password2&quot;</span> <span class="hljs-attribute">v-on:blur</span>=<span class="hljs-value">&quot;check_cpwd&quot;</span> <span class="hljs-attribute">type</span>=<span class="hljs-value">&quot;password&quot;</span> <span class="hljs-attribute">name</span>=<span class="hljs-value">&quot;cpwd&quot;</span> <span class="hljs-attribute">class</span>=<span class="hljs-value">&quot;input_txt&quot;</span>&gt;</span>
                <span class="hljs-tag">&lt;<span class="hljs-title">span</span> <span class="hljs-attribute">v-show</span>=<span class="hljs-value">&quot;error_check_password&quot;</span> <span class="hljs-attribute">class</span>=<span class="hljs-value">&quot;error&quot;</span>&gt;</span>&#x4E24;&#x6B21;&#x8F93;&#x5165;&#x7684;&#x5BC6;&#x7801;&#x4E0D;&#x4E00;&#x81F4;<span class="hljs-tag">&lt;/<span class="hljs-title">span</span>&gt;</span>
            <span class="hljs-tag">&lt;/<span class="hljs-title">div</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-title">div</span> <span class="hljs-attribute">class</span>=<span class="hljs-value">&quot;form_group&quot;</span>&gt;</span>
                <span class="hljs-tag">&lt;<span class="hljs-title">input</span> <span class="hljs-attribute">type</span>=<span class="hljs-value">&quot;submit&quot;</span> <span class="hljs-attribute">value</span>=<span class="hljs-value">&quot;&#x4E0B;&#x4E00;&#x6B65;&quot;</span> <span class="hljs-attribute">class</span>=<span class="hljs-value">&quot;input_sub&quot;</span>&gt;</span>
            <span class="hljs-tag">&lt;/<span class="hljs-title">div</span>&gt;</span>
        <span class="hljs-tag">&lt;/<span class="hljs-title">form</span>&gt;</span>

        <span class="hljs-comment">&lt;!-- &#x7B2C;&#x56DB;&#x90E8;&#x63D0;&#x793A; --&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-title">div</span> <span class="hljs-attribute">class</span>=<span class="hljs-value">&quot;pass_change_finish&quot;</span> <span class="hljs-attribute">v-show</span>=<span class="hljs-value">&quot;is_show_form_4&quot;</span>&gt;</span>&#x5BC6;&#x7801;&#x8BBE;&#x7F6E;&#x6210;&#x529F;&#xFF01;<span class="hljs-tag">&lt;/<span class="hljs-title">div</span>&gt;</span>

    <span class="hljs-tag">&lt;/<span class="hljs-title">div</span>&gt;</span>

    <span class="hljs-tag">&lt;<span class="hljs-title">div</span> <span class="hljs-attribute">class</span>=<span class="hljs-value">&quot;footer no-mp&quot;</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-title">div</span> <span class="hljs-attribute">class</span>=<span class="hljs-value">&quot;foot_link&quot;</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-title">a</span> <span class="hljs-attribute">href</span>=<span class="hljs-value">&quot;#&quot;</span>&gt;</span>&#x5173;&#x4E8E;&#x6211;&#x4EEC;<span class="hljs-tag">&lt;/<span class="hljs-title">a</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-title">span</span>&gt;</span>|<span class="hljs-tag">&lt;/<span class="hljs-title">span</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-title">a</span> <span class="hljs-attribute">href</span>=<span class="hljs-value">&quot;#&quot;</span>&gt;</span>&#x8054;&#x7CFB;&#x6211;&#x4EEC;<span class="hljs-tag">&lt;/<span class="hljs-title">a</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-title">span</span>&gt;</span>|<span class="hljs-tag">&lt;/<span class="hljs-title">span</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-title">a</span> <span class="hljs-attribute">href</span>=<span class="hljs-value">&quot;#&quot;</span>&gt;</span>&#x62DB;&#x8058;&#x4EBA;&#x624D;<span class="hljs-tag">&lt;/<span class="hljs-title">a</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-title">span</span>&gt;</span>|<span class="hljs-tag">&lt;/<span class="hljs-title">span</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-title">a</span> <span class="hljs-attribute">href</span>=<span class="hljs-value">&quot;#&quot;</span>&gt;</span>&#x53CB;&#x60C5;&#x94FE;&#x63A5;<span class="hljs-tag">&lt;/<span class="hljs-title">a</span>&gt;</span>
        <span class="hljs-tag">&lt;/<span class="hljs-title">div</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-title">p</span>&gt;</span>CopyRight &#xA9; 2016 &#x5317;&#x4EAC;&#x7F8E;&#x591A;&#x5546;&#x4E1A;&#x80A1;&#x4EFD;&#x6709;&#x9650;&#x516C;&#x53F8; All Rights Reserved<span class="hljs-tag">&lt;/<span class="hljs-title">p</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-title">p</span>&gt;</span>&#x7535;&#x8BDD;&#xFF1A;010-****888    &#x4EAC;ICP&#x5907;*******8&#x53F7;<span class="hljs-tag">&lt;/<span class="hljs-title">p</span>&gt;</span>
    <span class="hljs-tag">&lt;/<span class="hljs-title">div</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-title">script</span> <span class="hljs-attribute">type</span>=<span class="hljs-value">&quot;text/javascript&quot;</span> <span class="hljs-attribute">src</span>=<span class="hljs-value">&quot;js/find_password.js&quot;</span>&gt;</span><span class="undefined"></span><span class="hljs-tag">&lt;/<span class="hljs-title">script</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-title">body</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-title">html</span>&gt;</span>
</code></pre>
<p>&#x5728;js&#x76EE;&#x5F55;&#x4E2D;&#x65B0;&#x5EFA;find_password.js&#x6587;&#x4EF6;</p>
<pre><code class="lang-js"><span class="hljs-keyword">var</span> vm = <span class="hljs-keyword">new</span> Vue({
    el: <span class="hljs-string">&apos;#app&apos;</span>,
    data: {
        host: host,

        image_code_id: <span class="hljs-string">&apos;&apos;</span>,
        image_code_url: <span class="hljs-string">&apos;&apos;</span>,

        username: <span class="hljs-string">&apos;&apos;</span>,
        image_code: <span class="hljs-string">&apos;&apos;</span>,
        mobile: <span class="hljs-string">&apos;&apos;</span>,
        access_token: <span class="hljs-string">&apos;&apos;</span>,
        sms_code: <span class="hljs-string">&apos;&apos;</span>,
        user_id: <span class="hljs-string">&apos;&apos;</span>,
        password: <span class="hljs-string">&apos;&apos;</span>,
        password2: <span class="hljs-string">&apos;&apos;</span>,

        <span class="hljs-comment">// &#x53D1;&#x9001;&#x77ED;&#x4FE1;&#x7684;&#x6807;&#x5FD7;</span>
        sending_flag: <span class="hljs-literal">false</span>,

        error_username: <span class="hljs-literal">false</span>,
        error_image_code: <span class="hljs-literal">false</span>,
        error_sms_code: <span class="hljs-literal">false</span>,

        error_username_message: <span class="hljs-string">&apos;&apos;</span>,
        error_image_code_message: <span class="hljs-string">&apos;&apos;</span>,
        sms_code_tip: <span class="hljs-string">&apos;&#x83B7;&#x53D6;&#x77ED;&#x4FE1;&#x9A8C;&#x8BC1;&#x7801;&apos;</span>,
        error_sms_code_message: <span class="hljs-string">&apos;&apos;</span>,
        error_password: <span class="hljs-literal">false</span>,
        error_check_password: <span class="hljs-literal">false</span>,

        <span class="hljs-comment">// &#x63A7;&#x5236;&#x8868;&#x5355;&#x663E;&#x793A;</span>
        is_show_form_1: <span class="hljs-literal">true</span>,
        is_show_form_2: <span class="hljs-literal">false</span>,
        is_show_form_3: <span class="hljs-literal">false</span>,
        is_show_form_4: <span class="hljs-literal">false</span>,

        <span class="hljs-comment">// &#x63A7;&#x5236;&#x8FDB;&#x5EA6;&#x6761;&#x663E;&#x793A;</span>
        step_class: {
            <span class="hljs-string">&apos;step-1&apos;</span>: <span class="hljs-literal">true</span>,
            <span class="hljs-string">&apos;step-2&apos;</span>: <span class="hljs-literal">false</span>,
            <span class="hljs-string">&apos;step-3&apos;</span>: <span class="hljs-literal">false</span>,
            <span class="hljs-string">&apos;step-4&apos;</span>: <span class="hljs-literal">false</span>
        },
    },
    created: <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params"></span>)</span>{
        <span class="hljs-keyword">this</span>.generate_image_code();
    },
    methods: {
        <span class="hljs-comment">// &#x751F;&#x6210;uuid</span>
        generate_uuid: <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params"></span>)</span>{
            <span class="hljs-keyword">var</span> d = <span class="hljs-keyword">new</span> <span class="hljs-built_in">Date</span>().getTime();
            <span class="hljs-keyword">if</span>(<span class="hljs-built_in">window</span>.performance &amp;&amp; <span class="hljs-keyword">typeof</span> <span class="hljs-built_in">window</span>.performance.now === <span class="hljs-string">&quot;function&quot;</span>){
                d += performance.now(); <span class="hljs-comment">//use high-precision timer if available</span>
            }
            <span class="hljs-keyword">var</span> uuid = <span class="hljs-string">&apos;xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx&apos;</span>.replace(<span class="hljs-regexp">/[xy]/g</span>, <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">c</span>) </span>{
                <span class="hljs-keyword">var</span> r = (d + <span class="hljs-built_in">Math</span>.random()*<span class="hljs-number">16</span>)%<span class="hljs-number">16</span> | <span class="hljs-number">0</span>;
                d = <span class="hljs-built_in">Math</span>.floor(d/<span class="hljs-number">16</span>);
                <span class="hljs-keyword">return</span> (c ==<span class="hljs-string">&apos;x&apos;</span> ? r : (r&amp;<span class="hljs-number">0x3</span>|<span class="hljs-number">0x8</span>)).toString(<span class="hljs-number">16</span>);
            });
            <span class="hljs-keyword">return</span> uuid;
        },
        <span class="hljs-comment">// &#x751F;&#x6210;&#x4E00;&#x4E2A;&#x56FE;&#x7247;&#x9A8C;&#x8BC1;&#x7801;&#x7684;&#x7F16;&#x53F7;&#xFF0C;&#x5E76;&#x8BBE;&#x7F6E;&#x9875;&#x9762;&#x4E2D;&#x56FE;&#x7247;&#x9A8C;&#x8BC1;&#x7801;img&#x6807;&#x7B7E;&#x7684;src&#x5C5E;&#x6027;</span>
        generate_image_code: <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params"></span>)</span>{
            <span class="hljs-comment">// &#x751F;&#x6210;&#x4E00;&#x4E2A;&#x7F16;&#x53F7;</span>
            <span class="hljs-comment">// &#x4E25;&#x683C;&#x4E00;&#x70B9;&#x7684;&#x4F7F;&#x7528;uuid&#x4FDD;&#x8BC1;&#x7F16;&#x53F7;&#x552F;&#x4E00;&#xFF0C; &#x4E0D;&#x662F;&#x5F88;&#x4E25;&#x8C28;&#x7684;&#x60C5;&#x51B5;&#x4E0B;&#xFF0C;&#x4E5F;&#x53EF;&#x4EE5;&#x4F7F;&#x7528;&#x65F6;&#x95F4;&#x6233;</span>
            <span class="hljs-keyword">this</span>.image_code_id = <span class="hljs-keyword">this</span>.generate_uuid();

            <span class="hljs-comment">// &#x8BBE;&#x7F6E;&#x9875;&#x9762;&#x4E2D;&#x56FE;&#x7247;&#x9A8C;&#x8BC1;&#x7801;img&#x6807;&#x7B7E;&#x7684;src&#x5C5E;&#x6027;</span>
            <span class="hljs-keyword">this</span>.image_code_url = <span class="hljs-keyword">this</span>.host + <span class="hljs-string">&quot;/image_codes/&quot;</span> + <span class="hljs-keyword">this</span>.image_code_id + <span class="hljs-string">&quot;/&quot;</span>;
        },
        <span class="hljs-comment">// &#x68C0;&#x67E5;&#x6570;&#x636E;</span>
        check_username: <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params"></span>)</span>{
            <span class="hljs-keyword">if</span> (!<span class="hljs-keyword">this</span>.username) {
                <span class="hljs-keyword">this</span>.error_username_message = <span class="hljs-string">&apos;&#x8BF7;&#x586B;&#x5199;&#x7528;&#x6237;&#x540D;&#x6216;&#x624B;&#x673A;&#x53F7;&apos;</span>;
                <span class="hljs-keyword">this</span>.error_username = <span class="hljs-literal">true</span>;
            } <span class="hljs-keyword">else</span> {
                <span class="hljs-keyword">this</span>.error_username = <span class="hljs-literal">false</span>;
            }
        },
        check_image_code: <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params"></span>)</span>{
            <span class="hljs-keyword">if</span> (!<span class="hljs-keyword">this</span>.image_code) {
                <span class="hljs-keyword">this</span>.error_image_code_message = <span class="hljs-string">&apos;&#x8BF7;&#x586B;&#x5199;&#x9A8C;&#x8BC1;&#x7801;&apos;</span>;
                <span class="hljs-keyword">this</span>.error_image_code = <span class="hljs-literal">true</span>;
            } <span class="hljs-keyword">else</span> {
                <span class="hljs-keyword">this</span>.error_image_code = <span class="hljs-literal">false</span>;
            }
        },
        check_sms_code: <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params"></span>)</span>{
            <span class="hljs-keyword">if</span>(!<span class="hljs-keyword">this</span>.sms_code){
                <span class="hljs-keyword">this</span>.error_sms_code_message = <span class="hljs-string">&apos;&#x8BF7;&#x586B;&#x5199;&#x77ED;&#x4FE1;&#x9A8C;&#x8BC1;&#x7801;&apos;</span>;
                <span class="hljs-keyword">this</span>.error_sms_code = <span class="hljs-literal">true</span>;
            } <span class="hljs-keyword">else</span> {
                <span class="hljs-keyword">this</span>.error_sms_code = <span class="hljs-literal">false</span>;
            }
        },

        <span class="hljs-comment">// &#x7B2C;&#x4E00;&#x6B65;&#x8868;&#x5355;&#x63D0;&#x4EA4;, &#x83B7;&#x53D6;&#x624B;&#x673A;&#x53F7;&#x4E0E;&#x53D1;&#x9001;&#x77ED;&#x4FE1;&#x7684;token</span>
        form_1_on_submit: <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params"></span>)</span>{
            <span class="hljs-keyword">this</span>.check_username();
            <span class="hljs-keyword">this</span>.check_image_code();

            <span class="hljs-keyword">if</span> (<span class="hljs-keyword">this</span>.error_username == <span class="hljs-literal">false</span> &amp;&amp; <span class="hljs-keyword">this</span>.error_image_code == <span class="hljs-literal">false</span>) {
                axios.get(<span class="hljs-keyword">this</span>.host+<span class="hljs-string">&apos;/accounts/&apos;</span> + <span class="hljs-keyword">this</span>.username + <span class="hljs-string">&apos;/sms/token/?text=&apos;</span>+ <span class="hljs-keyword">this</span>.image_code + <span class="hljs-string">&apos;&amp;image_code_id=&apos;</span> + <span class="hljs-keyword">this</span>.image_code_id, {
                        responseType: <span class="hljs-string">&apos;json&apos;</span>
                    })
                    .then(response =&gt; {
                        <span class="hljs-keyword">this</span>.mobile = response.data.mobile;
                        <span class="hljs-keyword">this</span>.access_token = response.data.access_token;
                        <span class="hljs-keyword">this</span>.step_class[<span class="hljs-string">&apos;step-2&apos;</span>] = <span class="hljs-literal">true</span>;
                        <span class="hljs-keyword">this</span>.step_class[<span class="hljs-string">&apos;step-1&apos;</span>] = <span class="hljs-literal">false</span>;
                        <span class="hljs-keyword">this</span>.is_show_form_1 = <span class="hljs-literal">false</span>;
                        <span class="hljs-keyword">this</span>.is_show_form_2 = <span class="hljs-literal">true</span>;
                    })
                    .catch(error =&gt; {
                        <span class="hljs-keyword">if</span> (error.response.status == <span class="hljs-number">400</span>) {
                            <span class="hljs-keyword">this</span>.error_image_code_message = <span class="hljs-string">&apos;&#x9A8C;&#x8BC1;&#x7801;&#x9519;&#x8BEF;&apos;</span>;
                            <span class="hljs-keyword">this</span>.error_image_code = <span class="hljs-literal">true</span>;
                        } <span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> (error.response.status == <span class="hljs-number">404</span>) {
                            <span class="hljs-keyword">this</span>.error_username_message = <span class="hljs-string">&apos;&#x7528;&#x6237;&#x540D;&#x6216;&#x624B;&#x673A;&#x53F7;&#x4E0D;&#x5B58;&#x5728;&apos;</span>;
                            <span class="hljs-keyword">this</span>.error_username = <span class="hljs-literal">true</span>;
                        } <span class="hljs-keyword">else</span> {
                            <span class="hljs-built_in">console</span>.log(error.response.data);
                        }
                    })
            }
        },

        <span class="hljs-comment">// &#x7B2C;&#x4E8C;&#x6B65;</span>
        <span class="hljs-comment">// &#x53D1;&#x9001;&#x77ED;&#x4FE1;&#x9A8C;&#x8BC1;&#x7801;</span>
        send_sms_code: <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params"></span>)</span>{

        },
        <span class="hljs-comment">// &#x7B2C;&#x4E8C;&#x6B65;&#x8868;&#x5355;&#x63D0;&#x4EA4;&#xFF0C;&#x9A8C;&#x8BC1;&#x624B;&#x673A;&#x53F7;&#xFF0C;&#x83B7;&#x53D6;&#x4FEE;&#x6539;&#x5BC6;&#x7801;&#x7684;access_token</span>
        form_2_on_submit: <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params"></span>)</span>{

        },

        <span class="hljs-comment">// &#x7B2C;&#x4E09;&#x6B65;</span>
        check_pwd: <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params"></span>)</span>{

        },
        check_cpwd: <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params"></span>)</span>{

        },
        form_3_on_submit: <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params"></span>)</span>{

        }
    }
})
</code></pre>

                    
                    </section>
                
                
                </div>
            </div>
        </div>

        
        <a href="../../C02-Users/FindPassword/index.html" class="navigation navigation-prev " aria-label="Previous page: 找回密码"><i class="fa fa-angle-left"></i></a>
        
        
        <a href="../../C02-Users/FindPassword/Step2.html" class="navigation navigation-next " aria-label="Next page: 第二步"><i class="fa fa-angle-right"></i></a>
        
    </div>
</div>

        
<script src="../../gitbook/app.js"></script>

    
    <script src="../../gitbook/plugins/gitbook-plugin-search/lunr.min.js"></script>
    

    
    <script src="../../gitbook/plugins/gitbook-plugin-search/search.js"></script>
    

    
    <script src="../../gitbook/plugins/gitbook-plugin-sharing/buttons.js"></script>
    

    
    <script src="../../gitbook/plugins/gitbook-plugin-fontsettings/buttons.js"></script>
    

<script>
require(["gitbook"], function(gitbook) {
    var config = {"highlight":{},"search":{"maxIndexSize":1000000},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2}};
    gitbook.start(config);
});
</script>

        
    </body>
    
</html>
